package org.yasukusury.crawler;

import org.yasukusury.crawler.helper.BatchManager;
import org.yasukusury.crawler.helper.PageDistributor;
import org.yasukusury.crawler.helper.Result;
import org.yasukusury.crawler.helper.Statistics;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Future;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Y
 * Date: 2017-11-11
 * Time: 14:06
 */
public class Main {

    public static void main(String[] args ) throws Exception{
        String text = "C:\\Users\\Y\\Desktop\\test.txt";

        File file = new File(text);
        BufferedReader bs = new BufferedReader(new FileReader(file));
        List<String> asins = new ArrayList<>();
        String asin;
        while ((asin = bs.readLine()) != null) {
            asins.add(asin);
        }
        BatchManager bm = new BatchManager();
        bm.start(asins);
        Statistics statistics = new Statistics();
        statistics.start(asins);
    }


}
